VERSION 5.00
Begin VB.Form frmfont 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Font"
   ClientHeight    =   3975
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   4785
   ClipControls    =   0   'False
   ControlBox      =   0   'False
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmfont.frx":0000
   LinkTopic       =   "formfont"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3975
   ScaleWidth      =   4785
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Preview 
      Caption         =   "Preview"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1815
      Left            =   1800
      TabIndex        =   11
      Top             =   2040
      Width           =   1575
      Begin VB.Label PreviewLabel 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "MS Sans Serif"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   120
         TabIndex        =   12
         Top             =   240
         Width           =   1005
      End
   End
   Begin VB.TextBox myfontname 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   120
      TabIndex        =   10
      Text            =   "MS Sans Serif"
      Top             =   120
      Width           =   1575
   End
   Begin VB.ListBox myfontsize 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1425
      ItemData        =   "frmfont.frx":0CCA
      Left            =   1800
      List            =   "frmfont.frx":0CE0
      TabIndex        =   8
      Top             =   480
      Width           =   1575
   End
   Begin VB.Frame Style 
      Caption         =   "Style"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1815
      Left            =   120
      TabIndex        =   3
      Top             =   2040
      Width           =   1575
      Begin VB.CheckBox Underline 
         Caption         =   "Underline"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   -1  'True
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   7
         Top             =   1440
         Width           =   1095
      End
      Begin VB.CheckBox Strikethru 
         Caption         =   "Strikethru"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   -1  'True
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   1080
         Width           =   1095
      End
      Begin VB.CheckBox Italic 
         Caption         =   "Italic"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   -1  'True
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   720
         Width           =   1095
      End
      Begin VB.CheckBox Bold 
         Caption         =   "Bold"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   4
         Top             =   360
         Width           =   1095
      End
   End
   Begin VB.ListBox FontList 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1425
      Left            =   120
      TabIndex        =   2
      Top             =   480
      Width           =   1575
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "Cancel"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3480
      TabIndex        =   1
      Top             =   600
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "OK"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3480
      TabIndex        =   0
      Top             =   120
      Width           =   1215
   End
   Begin VB.TextBox mysizenum 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   1800
      TabIndex        =   9
      Text            =   "8"
      Top             =   120
      Width           =   1575
   End
End
Attribute VB_Name = "frmfont"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub Bold_Click()
    fontset PreviewLabel
End Sub

Private Sub CancelButton_Click()
    Unload Me
End Sub

Private Sub FontList_Click()
    myfontname.Text = Trim(FontList.List(FontList.ListIndex))
End Sub

Private Sub Italic_Click()
    fontset PreviewLabel
End Sub

Private Sub myfontname_Change()
    Dim i As Long
    For i = 0 To FontList.ListCount - 1
        If FontList.List(i) = myfontname.Text Then
            FontList.ListIndex = i
            fontset PreviewLabel
            PreviewLabel.Caption = myfontname.Text
        End If
    Next i
End Sub

Private Sub myfontsize_Click()
    mysizenum.Text = Trim(myfontsize.List(myfontsize.ListIndex))
End Sub

Private Sub Form_Load()
    Dim i As Long
    fontload frmmain.Labelshow
    FontList.Clear
    For i = 0 To Screen.FontCount - 1
        FontList.AddItem Screen.Fonts(i)
        If Screen.Fonts(i) = myfontname.Text Then FontList.ListIndex = i
    Next i
End Sub

Private Sub mysizenum_Change()
    Dim i As Long
    If Val(mysizenum.Text) > 0 And Val(mysizenum.Text) < 1574 Then fontset PreviewLabel
    For i = 0 To myfontsize.ListCount - 1
        If myfontsize.List(i) = Val(mysizenum.Text) Then myfontsize.ListIndex = i
    Next i
End Sub

Private Sub OKButton_Click()
    fontset frmmain.Labelshow
    Unload Me
End Sub

Sub fontset(frm As Object)
    frm.FontBold = CBool(Bold.Value)
    frm.FontItalic = CBool(Italic.Value)
    frm.FontStrikethru = CBool(Strikethru.Value)
    frm.FontUnderline = CBool(Underline.Value)
    frm.FontName = myfontname.Text
    frm.FontSize = CInt(Val(mysizenum.Text))
End Sub

Sub fontload(frm As Object)
    Bold.Value = Abs(CInt(frm.FontBold))
    Italic.Value = Abs(CInt(frm.FontItalic))
    Strikethru.Value = Abs(CInt(frm.FontStrikethru))
    Underline.Value = Abs(CInt(frm.FontUnderline))
    myfontname.Text = frm.FontName
    mysizenum.Text = Trim(Str(CInt(frm.FontSize)))
End Sub

Private Sub Strikethru_Click()
    fontset PreviewLabel
End Sub

Private Sub Underline_Click()
    fontset PreviewLabel
End Sub
